//
//  TYCyclePagerViewCell.m
//  TYCyclePagerViewDemo
//
//  Created by tany on 2017/6/14.
//  Copyright © 2017年 tany. All rights reserved.
//

#import "TYCyclePagerViewCell.h"
#import "UIImageView+WebCache.h"

@interface TYCyclePagerViewCell ()

@property (nonatomic, copy) NSString *imageUrlString;
@property (nonatomic, strong) UIImageView *imageView;

@end

@implementation TYCyclePagerViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        self.imageView = [[UIImageView alloc] initWithFrame:self.bounds];
        self.imageView.contentMode = UIViewContentModeScaleAspectFill;
        [self addSubview:self.imageView];
        
    }
    return self;
}


- (void)setImageUrlString:(NSString *)imageUrlString isVideo:(BOOL)isVideo
{
    _imageUrlString = imageUrlString;
    
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:imageUrlString] placeholderImage:[UIImage imageNamed:@"h_placeholder_img"] options:SDWebImageRetryFailed];
    
}

@end
